<% layout('/layouts/default.html', {title: '考核自评通知', libs: ['layout', 'dataGrid']}){ %>
<div class="main-content">
    <div class="box box-main">
        <div class="box-header">
            <#form:form id="searchForm" model="${dcSupExamNotice}" action="${ctx}/score/dcSupExamScoreInfo/noticeData?noticeType=${dcSupExamNotice.noticeType}" method="post" class="form-inline"
            data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
            <div style="float: right">
                <div class="form-group">
                    <label class="control-label">${text('年度')}：</label>
                    <div class="control-inline width-120">
                        <#form:select path="examYear" blankOption="true" data-placeholder="请选择" itemLabel="dictLabel" itemValue="dictValue" class="form-control width-120"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label">${text('类别')}：</label>
                    <div class="control-inline width-160">
                        <#form:select path="quotaType" blankOption="true" data-placeholder="请选择" itemLabel="dictLabel" itemValue="dictValue" class="form-control width-160"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label">${text('标题')}：</label>
                    <div class="control-inline width-160">
                        <#form:input path="noticeTitle" maxlength="200" class="form-control width-160" placeholder="请输入任务标题"/>
                    </div>
                </div>
                <div class="form-group">
                    <button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
                    <button onclick="cz();" class="btn btn-default btn-sm">${text('重置')}</button>
                </div>
            </div>
        </#form:form>
    </div>
    <div class="box-body">
        <table id="dataGrid"></table>
        <div id="dataGridPage"></div>
    </div>
</div>
</div>
<% } %>
<script>
    //重置
    function cz(){
        searchForm.reset();
        $('#dataGrid').dataGrid('reloadGrid');
    }

    $('#dataGrid').dataGrid({
        dataGridPage: $('#dataGridPage'),
        searchForm: $("#searchForm"),
        sortableColumn: false, // 列表不允许排序
        columnModel: [
            {header:'${text("id")}',hidden: true, name:'id',width:150, align:"left", frozen:true},
            {header:'${text("考核id")}',hidden: true, name:'examId',width:150, align:"left", frozen:true},
            {header:'${text("通知标题")}',sortable:false, name:'noticeTitle',width:100, align:"center"},
            {header:'${text("通知内容")}',sortable:false, name:'noticeContent',width:150, align:"left"},
            // {header:'${text("报送单位")}',sortable:false, name:'dcSupTaskInfo.taskTypeName', index:'a.task_type_name', width:150, align:"left" },
            {header:'考核年份',sortable:false, name:'examYear',width:150, align:"left"},
            {header:'报送时限',sortable:false, name:'noticeEndTime',  width:150, align:"left"},
            {header:'附件', name:'feedbackContent', width:150, align:"left"},
            {header: "接收状态",name: 'feedback.feedbackEndTimeStr',width: 150,align: 'center'},
            {header:'${text("操作")}',sortable:false,align:"center", name:'actions1', width:200, formatter: function(val, obj, row, act){
                    var actions = [];
                     actions.push('<a href="${ctx}/score/dcSupExamZpScore/view?&examId=' + row.examId + '&id='+row.id+'" class="btn btn-primary btn-xs btnList" title="${text("自评")}"><span>自评</span></a>&emsp;');
                     actions.push('<a href="${ctx}/score/dcSupExamGJZBScore/view?&examId=' + row.examId + '&id='+row.id+'" class="btn btn-primary btn-xs btnList" title="${text("关键考核")}"><span>关键考核</span></a>&emsp;');
                     actions.push('<a href="${ctx}/score/dcSupExamDXZBScore/view?&examId=' + row.examId + '&id='+row.id+'" class="btn btn-primary btn-xs btnList" title="${text("单项考核")}"><span>单项考核</span></a>&emsp;');
                    return actions.join('');
            }}
        ],
        onSelectRow: function(id, isSelect, event){

        },
        ajaxSuccess: function(data){

        }
    });

</script>